import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    token: "", //权限验证
    tagsList: [], //打开的标签页个数,
    isCollapse: false //侧边导航是否折叠
  },
  mutations: {
    //保存token
    COMMIT_TOKEN(state, object) {
      state.token = object.token;
    },
    IS_COLLAPSE(state, bool) {
      state.isCollapse = bool;
    }
  },
  actions: {},
  modules: {}
});
